1. Technical Field
The present invention relates generally to an improved data processing system, and in particular, to a method and apparatus for managing data. Still more particularly, the present invention provides a method and apparatus for ensuring that processors accessing data obtain updated values.
2. Description of Related Art
With increasing processing demands, many data processing systems now contain multiple processors. With multiple processors, processing tasks may be split up between these processors. Further, these processors may access information that is accessed by other processors within the data processing system.
It is important for each processor in a multi-data processing system to be able to access updated values. At times, it is desirable to know when each processor has access to selected data. Instructions, such as sync instructions, imply that other processors will obtain updated values for information in memory. A sync instruction is an instruction that forces a flush of all changes to memory that are in a cache local to a CPU into main memory, and invalidates any cache lines that other CPUs may have that are for the same memory. So after a sync, the next time any CPU accesses a changed memory location, it will load the updated value from memory, rather than a stale value from its cache. These instructions, however, do not mean that the processors will not retain a local copy of an old value in a register. Such a situation may result in inaccuracies in calculations.
Therefore, it would be advantageous to have an improved method, apparatus, and computer instructions for ensuring that processors have up-to-date information in their registers.